package repo

import (
	"context"
	"gotham-plan-manage/internal/domain/model/plan-aggregate/aggregate"
	entity2 "gotham-plan-manage/internal/domain/model/plan-aggregate/entity"
)

type PlanManageIRepo interface {
	CreatePlan(context.Context, *aggregate.PlanAggregate) error
	DeleteTaskByPlanId(ctx context.Context, plan *aggregate.PlanAggregate) error
	DeleteTaskItemByPlanId(ctx context.Context, plan *aggregate.PlanAggregate) error
	DeletePlan(ctx context.Context, plan *aggregate.PlanAggregate) error
	FindPlanById(context context.Context, planId string) (*aggregate.PlanAggregate, error)
	FindCompletePlanById(context context.Context, planId string) (*aggregate.PlanAggregate, error)
	FindPlanContainsDetailById(context context.Context, planId string) (*aggregate.PlanAggregate, error)
	EditPlan(ctx context.Context, planAggregate *aggregate.PlanAggregate) error
	EditTarget(ctx context.Context, planAggregate *aggregate.PlanAggregate) error
	SubmitPlanReport(context context.Context, plan *aggregate.PlanAggregate) error
	FindPlanContainsReportById(context context.Context, planId string) (*aggregate.PlanAggregate, error)
	FindPlanContainsTaskByPlanIdAndDate(context context.Context, planId string, executeDate string) (*aggregate.PlanAggregate, error)
	FindParentPlanListPage(context context.Context, page int, pageSize int, userId string) ([]*aggregate.PlanAggregate, int64, error)
	GetTaskTotalByPlanId(ctx context.Context, planId string, finished bool) (int64, error)
	FindChildrenPlanListByParentId(ctx context.Context, parentId string, userID string) ([]*aggregate.PlanAggregate, error)
	CreateTask(context context.Context, plan *aggregate.PlanAggregate) error
	DeleteTaskItem(context context.Context, taskItemId string) error
	DeleteTask(context context.Context, taskId string) error
	GetTaskItemById(context context.Context, taskItemId string) (*aggregate.PlanAggregate, error)
	GetTaskList(context context.Context, planId string, page int, pageSize int) (*aggregate.PlanAggregate, int64, error)
	GetTaskById(context context.Context, taskId string) (*aggregate.PlanAggregate, error)
	FinishTaskItem(context context.Context, plan *aggregate.PlanAggregate) error
	FindOneDayQuestions(context context.Context, planId string, taskDate string) (*aggregate.PlanAggregate, error)
	SearchQuestions(context context.Context, planId string, content string) (*aggregate.PlanAggregate, error)
	IsFinishTask(context context.Context, planID string) (bool, error)
	GetOngoingTasksByPlanIds(context context.Context, planIds []string, scope string) ([]*entity2.Task, error)
	FindOngoingPlanIds(ctx context.Context, userID string) ([]string, error)
	FindOngoingTaskItems(ctx context.Context, TodoTaskId string) ([]*entity2.TaskItem, error)
	EditTaskItem(ctx context.Context, plan *aggregate.PlanAggregate) error
	BatchDeleteQuestions(ctx context.Context, deleteQuestions []*entity2.Question) error
	SaveQuestions(ctx context.Context, plan *aggregate.PlanAggregate) error
	FinishPlan(ctx context.Context, plan *aggregate.PlanAggregate) error
	FindTaskByPlanIdAndDate(context context.Context, planId string, executeDate string) ([]*entity2.Task, error)
	FindAllPlanByUserId(ctx context.Context, userId string) ([]*aggregate.PlanAggregate, error)
	FindAllTaskByPlanId(ctx context.Context, planID string) (*aggregate.PlanAggregate, error)
	GetTaskItemByTaskId(ctx context.Context, taskId string) ([]*entity2.TaskItem, error)
	GetOngoingPlanByUserId(ctx context.Context, userId string) (*aggregate.PlanAggregate, error)
	FindAllTaskItemByPlanId(ctx context.Context, planID string) ([]*entity2.TaskItem, error)
	GetTaskItemTotalByTaskId(ctx context.Context, taskId string) (int64, error)
	GetFinishTaskItemTotalByDateRange(ctx context.Context, planID string, startDate string, endDate string) (int32, error)
}
